<template>

  <div>
    <h2 style="text-align: center">个人信息</h2>
    <el-form ref="form" label-width="100px" v-model="employee" >

      <el-row>
        <el-col :span="8">
          <el-form-item label="员工id">
            <el-input v-model="employee.userId" disabled="true"></el-input>
          </el-form-item>
        </el-col>
<!--        <el-col :span="8">-->
<!--          <el-form-item label="活动区域">-->
<!--            <el-select v-model="employee.userId" placeholder="请选择活动区域">-->
<!--              <el-option label="区域一" value="shanghai"></el-option>-->
<!--              <el-option label="区域二" value="beijing"></el-option>-->
<!--            </el-select>-->
<!--          </el-form-item>-->
<!--        </el-col>-->
        <el-col :span="6">
          <el-form-item label="员工姓名">
            <el-input v-model="employee.username" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="员工性别">
            <el-input v-model="employee.gender" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="民族">
            <el-input v-model="employee.nationId" disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="政治面貌">
            <el-input v-model="employee.politicaltype" disabled="true"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="16">
          <el-form-item label="地址">
            <el-input v-model="employee.address" disabled="true"  prop="address"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="身份证号">
            <el-input v-model="employee.IdCard" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="电话号码：">
            <el-input v-model="employee.phone" disabled="true" prop="phone"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="目前最高学历">
            <el-input v-model="employee.education" disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="10">
          <el-form-item label="专业">
            <el-input v-model="employee.educationsubject" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="毕业院校">
            <el-input v-model="employee.school" disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="8">
          <el-form-item label="部门id">
            <el-input v-model="employee.departmentId" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="部门名称">
            <el-input v-model="employee.departmentName" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="个人工号">
            <el-input v-model="employee.workId" disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="职位">
            <el-input v-model="employee.workName" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="基本工资">
            <el-input v-model="employee.baseSalary" disabled="true"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="邮箱" prop="emails">
            <el-input v-model="employee.email"   prop="address" disabled="true"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row style="text-align: center">
        <el-button @click="change">修改信息</el-button>
        <el-button @click="returnlogin">返回首页</el-button>
      </el-row>
    </el-form>
  </div>

</template>

<script>
  import {reloadEmployee} from '../viewjs/personal_informationHandler'
    export default {
        name: "personal_information",
        data() {
        return {
            employee: {
              userId: "",
              username: "",
              IdCard: "",
              email:"",
              gender: "",
              politicaltype: "",
              nationId: "",
              address: "",
              phone: "",
              education: "",
              educationsubject: "",
              school: "",
              departmentId: "",
              departmentName: "",
              workId: "",
              workName: "",
              baseSalary:""

            }

        }
      },
      mounted() {

          this.reloadEmployee()
      },
      methods: {
        returnlogin(){
          this.$store.commit("setviewPage",1);
          this.$router.push({path: '/home'});
        },
          reloadEmployee,

        change() {
          this.$router.push({path:'/person_information_change'});
        }
      }
    }
</script>

<style scoped>

</style>
